package feiyanren.com;

import java.util.ArrayList;

public class A01_BasicDemo1 {
    public static void main(String[] args) {
        int[] arr = {1,2,3,4,5,5};
        ArrayList<Integer> list = find(arr,5);
        System.out.println(list);
    }
    public static ArrayList<Integer> find(int[] arr,int target){
        ArrayList<Integer> list = new ArrayList<>();
        for(int i=0;i<arr.length;i++){
            if(arr[i] == target){
                list.add(i);
            }
        }
        return list;
    }
}
